Skip to content

Windows: Keep ZDSR DLL loaded during shutdown - #110

Open
chenxianghui1130 wants to merge 1 commit into
ethindp:masterfrom
chenxianghui1130:fix/zdsr-shutdown-unload
Open

Windows: Keep ZDSR DLL loaded during shutdown#110
chenxianghui1130 wants to merge 1 commit into
ethindp:masterfrom
chenxianghui1130:fix/zdsr-shutdown-unload

Conversation

@chenxianghui1130

Copy link
Copy Markdown

ZDSR can leave asynchronous work running after Prism releases its backend. prism_shutdown currently unloads ZDSRAPI.dll/ZDSRAPI_x64.dll, which intermittently leaves the host executing code from an unloaded module.

Windows Error Reporting captured ZDSRAPI_x64.dll_unloaded with 0xc0000005 at the same offset across separate runs. An automated application exit loop reproduced this in 3/5 runs with v0.18.2. Keeping the ZDSR delay-loaded DLL resident until process termination produced 30/30 clean exits in Debug and Release builds.

Prism still releases the backend, context, and availability enumerator normally. Other delay-loaded backends are unchanged.

A CI regression test is not included because reproduction requires the proprietary ZDSR installation and is timing-dependent.

Fixes #109

AI assistance was used for crash analysis and drafting. I reproduced the issue, reviewed the change, and verified the results.

ZDSR may still execute asynchronous code while Prism shuts down. Unloading its delay-loaded DLL at that point causes intermittent access violations in the host process.

Signed-off-by: chenxianghui1130 <chenxianghui1130@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZDSR backend can crash in prism_shutdown after its DLL is unloaded

1 participant